﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

using System.Text;
using Rison.Web.Common;
using Rison.BusinessFacade.Common;
using Rison.BusinessFacade.Entity.XT;
using Rison.BusinessFacade.Facade.XT;
using Rison.BusinessFacade.Helper;

namespace Rison.Web.admin
{
    public partial class AdminView : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!CurrentLoginedUser.Logined)
            {
                this.labMsg.Text = "对不起，请先<a href='Login.aspx?fromadmin=1' target='_self' style='text-decoration:underline;'>登录</a>！";
                Response.Redirect("Login.aspx?fromadmin=1");
            }

            else if (!this.IsPostBack)
                BindModules();
        }

        private void BindModules()
        {
            DataTable testSource = new DataTable();
            testSource.Columns.Add("Url", typeof(System.String));
            testSource.Columns.Add("Title", typeof(System.String));
            DataRow dr = null;
            for (int i = 1; i < 5; i++)
            {
                dr = testSource.NewRow();
                dr["Url"] = "#";
                if (i == 1)
                {
                    dr["Title"] = "纠风信息";
                }
                else if (i == 2)
                {
                    dr["Title"] = "纠纷诉求";
                }
                else if (i == 3)
                {
                    dr["Title"] = "网上测评";
                }
                else if (i == 4)
                {
                    dr["Url"] = "ChangePwd.aspx";
                    dr["Title"] = "修改密码";
                }

                testSource.Rows.Add(dr);
            }

            this.dlMenu.DataSource = testSource;
            this.dlMenu.DataBind();

        }
    }
}
